class People {
  clever: boolean;

  name: string;
  sex: string;

  constructor(name: string) {
    this.clever = true;
    this.name = name;
  }

  sayName(): void {
    console.log("My name is " + this.name);
  }
  getName(): string {
    return this.name;
  }
}

console.log(People);

let p = new People("dd");
console.log(p);
p.getName();

console.log("--------------extends----------------");

class Chinese extends People {
  zodiac: string;

  sayName(): void {
    console.log("我的名字叫 " + this.name);
  }
  kongfu(): void {
    console.log("kongfu:  " + "太极");
  }
}

console.log(Chinese);

var Ming = new Chinese("小明");
var Wang = new Chinese("小王");

Ming.sayName();
Ming.getName();
Ming.kongfu();

console.log(Ming);
console.log(" Ming 对象是 People  类实例化来的吗？ ", Ming instanceof People);
console.log(" Ming 对象是 Chinese 类实例化来的吗？ ", Ming instanceof Chinese);

console.log("--------------interface----------------");
interface ITeacher {
  subject: string;
  level: string;
  sayHi: () => string;
}

var chineseTeacher: ITeacher = {
  subject: "chinese",
  level: "10",
  sayHi: (): string => {
    return "";
  },
};

// 声明文件不包含实现，它只是类型声明，把声明文件加入到 TypeScript 中
//、/ <reference path="./Calc.d.ts" />
// var obj = new Runoob.Calc();
// console.log(obj.doSum(10));



// export default People
